package docker

import (
	_ "github.com/docker/docker/api/types"
)

type (
	Image struct {
		Name []string `json:"name"`
		Id   string   `json:"id"`
	}
	ImageList []Image
	Stack     struct {
	}
	LabDockerConfig struct {
		CName           string   `json:"cname,omitempty"`
		Privileged      bool     `json:"privileged,omitempty"`      // 容器完全权限参数
		AttachStdin     bool     `json:"attachstdin,omitempty"`     // Attach the standard input, makes possible user interaction
		AttachStdout    bool     `json:"attachstdout,omitempty"`    // Attach the standard output
		AttachStderr    bool     `json:"attachstderr,omitempty"`    // Attach the standard error
		Tty             bool     `json:"tty,omitempty"`             // Attach standard streams to a tty, including stdin if it is not closed.
		OpenStdin       bool     `json:"openstdin,omitempty"`       // Open stdin
		StdinOnce       bool     `json:"stdinonce,omitempty"`       // If true, close stdin after the 1 attached client disconnects.
		Env             []string `json:"env,omitempty"`             // List of environment variable to set in the container
		Cmd             []string `json:"cmd,omitempty"`             // Command to run when starting the container
		ArgsEscaped     bool     `json:"argsescaped,omitempty"`     // True if command is already escaped (meaning treat as a command line) (Windows specific).
		WorkingDir      string   `json:"workingdir,omitempty"`      // Current directory (PWD) in the command will be launched
		Entrypoint      []string `json:"entrypoint,omitempty"`      // Entrypoint to run when starting the container
		NetworkDisabled bool     `json:"networkdisabled,omitempty"` // 是否关闭网络
		Shell           []string `json:"shell,omitempty"`           // shell
	}
	CtfDocker struct {
		Docker
		Flags []string `json:"flags,omitempty"`
	}
	Docker struct {
		Image string   `json:"image,omitempty"`
		Id    string   `json:"id,omitempty"`
		Name  string   `json:"name,omitempty"`
		Ports []string `json:"ports,omitempty"`
	}
	LabDocker struct {
		Docker
		LabDockerConfig
		PortMapping []string
		Isvnc       int `json:"isvnc,omitempty"`
	}
	ImageControl interface {
		Build() (string, error)
		BuildInfo() (string, error)
		Show() (Image, error)
		IsExist() bool
	}
)
